/*
 * OutFileImpl.h
 *
 *  Created on: 2011/07/02
 *      Author: naoki
 */

#ifndef INCLUDED_NTENGINE_FILEIO_OUTFILEIMPL_H
#define INCLUDED_NTENGINE_FILEIO_OUTFILEIMPL_H

#include "NTEngine/NTEngine.h"
#include "NTEngine/FileIO/OutFile.h"
#include "NTEngine/Base/ReferenceCounter.h"
#include <fstream>
#include <list>
#include <string>

namespace NTEngine {
namespace FileIO {
using namespace std;

class OutFile::Impl : public ReferenceCounter {
	typedef list< Impl* >::iterator It;

public:
	Impl( int id )
	: mId( id )
	, mIsError( false )
	, mIsFinished( false ) {
	}

	int id() const {
		return mId;
	}

	bool isError() const {
		return mIsError;
	}

	bool isFinished() const {
		return mIsFinished;
	}

	void setError() {
		mIsError = mIsFinished = true;
	}

	void setFinished() {
		mIsFinished = true;
	}

private:
	int mId;
	bool mIsError;
	bool mIsFinished;
};

} //namespace FileIO
} //namespace NTEngine

#endif //
